package cn.xxstudy.blog.dao

import cn.xxstudy.blog.entity.Comment
import org.springframework.data.domain.Sort
import org.springframework.data.jpa.repository.JpaRepository

/**
 * 作者：xinxi on 2020/11/29 13:46
 * 包名：cn.xxstudy.blog.dao
 * TODO：评论数据库操作
 */
interface CommentRepository : JpaRepository<Comment, Long> {
    fun findByBlogIdAndParentCommentNull(id: Long, sort: Sort): List<Comment>

    fun deleteCommentByBlogId(id: Long)
}